package com.iscas.tech.vo;

import com.alibaba.fastjson.JSON;
import com.iscas.tech.entity.AtExperts;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.text.StringEscapeUtils;

import java.util.Date;
import java.util.List;

public class MdWithExpert {
    @ApiModelProperty("主键ID")
    private Integer id;

    @ApiModelProperty("专家姓名")
    private String epName;

    @ApiModelProperty("毕业院校")
    private String epGschool;

    @ApiModelProperty("毕业时间")
    private String gradTime;

    @ApiModelProperty("职称")
    private String epTpost;

    @ApiModelProperty("职业资格")
    private String epQualt;

    @ApiModelProperty("工作单位")
    private String epOrgzt;

    @ApiModelProperty("工作单位类型（如：高等院校、企业、科研单位、事业单位等）")
    private String orgType;

    @ApiModelProperty("专家简介")
    private String epDetail;

    @ApiModelProperty("主要成就")
    private String epAcvmt;

    @ApiModelProperty("研究方向")
    private String epDirect;

    @ApiModelProperty("发布人id（对应表3的人员id）")
    private Integer sdResId;

    @ApiModelProperty("发布时间")
    private Date sdResTime;

    @ApiModelProperty("是否审核（0:未审核(默认) 1:已审核）")
    private Integer adStatus;

    @ApiModelProperty("专家照片")
    private String epPic;

    @ApiModelProperty("专家类型（1:专家信息 2:科技人才）")
    private Integer epType;

    @ApiModelProperty("创建人")
    private Integer createTitle;

    /**
     * 标签列表
     */
    private List<Tag> tagList;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEpName() {
        return epName;
    }

    public void setEpName(String epName) {
        this.epName = epName;
    }

    public String getEpGschool() {
        return epGschool;
    }

    public void setEpGschool(String epGschool) {
        this.epGschool = epGschool;
    }

    public String getGradTime() {
        return gradTime;
    }

    public void setGradTime(String gradTime) {
        this.gradTime = gradTime;
    }

    public String getEpTpost() {
        return epTpost;
    }

    public void setEpTpost(String epTpost) {
        this.epTpost = epTpost;
    }

    public String getEpQualt() {
        return epQualt;
    }

    public void setEpQualt(String epQualt) {
        this.epQualt = epQualt;
    }

    public String getEpOrgzt() {
        return epOrgzt;
    }

    public void setEpOrgzt(String epOrgzt) {
        this.epOrgzt = epOrgzt;
    }

    public String getOrgType() {
        return orgType;
    }

    public void setOrgType(String orgType) {
        this.orgType = orgType;
    }

    public String getEpDetail() {
        return StringEscapeUtils.unescapeHtml4(epDetail);
    }

    public void setEpDetail(String epDetail) {
        this.epDetail = epDetail;
    }

    public String getEpAcvmt() {
        return StringEscapeUtils.unescapeHtml4(epAcvmt);
    }

    public void setEpAcvmt(String epAcvmt) {
        this.epAcvmt = epAcvmt;
    }

    public String getEpDirect() {
        return StringEscapeUtils.unescapeHtml4(epDirect);
    }

    public void setEpDirect(String epDirect) {
        this.epDirect = epDirect;
    }

    public Integer getSdResId() {
        return sdResId;
    }

    public void setSdResId(Integer sdResId) {
        this.sdResId = sdResId;
    }

    public Date getSdResTime() {
        return sdResTime;
    }

    public void setSdResTime(Date sdResTime) {
        this.sdResTime = sdResTime;
    }

    public Integer getAdStatus() {
        return adStatus;
    }

    public void setAdStatus(Integer adStatus) {
        this.adStatus = adStatus;
    }

    public String getEpPic() {
        return epPic;
    }

    public void setEpPic(String epPic) {
        this.epPic = epPic;
    }

    public Integer getEpType() {
        return epType;
    }

    public void setEpType(Integer epType) {
        this.epType = epType;
    }

    public Integer getCreateTitle() {
        return createTitle;
    }

    public void setCreateTitle(Integer createTitle) {
        this.createTitle = createTitle;
    }

    public List<Tag> getTagList() {
        return tagList;
    }

    public void setTagList(List<Tag> tagList) {
        this.tagList = tagList;
    }

    public AtExperts transform() {
        AtExperts expert = new AtExperts();
        expert.setId(getId());
        expert.setEpName(getEpName());
        expert.setEpGschool(getEpGschool());
        expert.setGradTime(getGradTime());
        expert.setEpTpost(getEpTpost());
        expert.setEpQualt(getEpQualt());
        expert.setEpOrgzt(getEpOrgzt());
        expert.setOrgType(getOrgType());
        expert.setEpDetail(getEpDetail());
        expert.setEpAcvmt(getEpAcvmt());
        expert.setEpDirct(getEpDirect());
        expert.setSdResid(getSdResId());
        expert.setAdStatus(getAdStatus());
        expert.setSdRestime(getSdResTime());
        expert.setEpPic(getEpPic());
        expert.setEpType(getEpType());
        expert.setCreatetitle(getCreateTitle());
        return expert;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
